home *** CD-ROM | disk | FTP | other *** search
- // Chap15_3.cpp
- // This won't compile due to ambiguities in the constructor.
- class Student
- {
- public:
- Student(char *pName = "no name");
- Student(Student&);
- };
- class Teacher
- {
- public:
- Teacher(char *pName = "no name");
- Teacher(Teacher&);
- };
- void addCourse(Student);
- void addCourse(Teacher);
-
- int main()
- {
- addCourse("Prof. Dingleberry");
- return 0;
- }
-